import { createApp } from 'vue'
import App from './App.vue'

//ElementUI
import ElementUI from 'element-plus'

//antdesign
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'

import 'element-plus/dist/index.css'
import route from "@/route";
import store from './store'
import axios from "axios";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as AntdIconsVue from '@ant-design/icons-vue'


// require('./mock');

const app = createApp(App)
axios.defaults.headers.common['token'] = localStorage.getItem("token");
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementUI)
app.use(route)
app.use(store)

//antdesign
for (const [key, component] of Object.entries(AntdIconsVue)) {
    app.component(key, component)
}
app.use(Antd)


app.mount('#app')
